Work positioning device

ABSTRACT

Regarding predetermined positioning criteria (M 1 , M 2 ), ((G 1 , G 2 ), (N 1 , or N 2 ), (K 1 , K 2 )), there is provided image processing means ( 40 B) for obtaining by image processing, measured values (C D1 , C D2 ) ((G D1 , G D2 ), (N D1 , or N D2 ), (K D1 , K D2 )) and reference values (C R1 , C R2 ) ((G R1 , G R2 ), (N R1 , or N R2 ), (K R1 , K R2 )), and for moving a work (W) in a manner that the measured values (C D1 , C D2 ) ((G D1 , G D2 ), (N D1 , or N D2 ), (K D1 , K D2 )) and the reference values (C R1 , C R2 ) ((G R1 , G R2 ), (N R1 , or N R2 ), (K R1 , K R2 )) coincide with each other, thereby positioning the work (W) at a predetermined position.

TECHNICAL FIELD

The present invention relates to a work positioning device, and inparticular to a work positioning device which positions a work at apredetermined position by image processing.

BACKGROUND ART

Conventionally, a bending machine such as a press brake (FIG. 25(A))comprises a punch P mounted on an upper table 52 and a die D mounted ona lower table 53, and moves either one of the tables upward or downwardto bend a work W by cooperation of the punch P and die D.

In this case, before the bending operation, the work W is positioned ata predetermined position by being butted on a butting face 50 which isset behind the lower table 53.

In a case where an automatic bending operation is carried out with theuse of a robot, the work W is positioned by a gripper 51 of the robotsupporting the work W to place the work W on the die D and butt the workW on the butting face 50.

In order to bend a work W having its C portion forming-processed asshown in FIG. 25(B), one end A of the work W is supported by the gripper51 of the robot, and the other end B is butted on the butting face 50.

However, in this case, the portion of the work W between the other end Band the portion placed on the die D is mildly curved as shown in FIG.25(A).

Accordingly, the butting of the work W against the butting face 50 bythe gripper 51 of the robot becomes very unstable, making it impossibleto achieve accurate positioning. If a human worker determines theposition of the work W by holding the work W, accurate positioning mightbe available due to the worker's sense developed over years. However, arobot can not achieve accurate positioning by trial and error.

Further, in a case where a corner of a work W is to be bent along abending line m as shown in FIG. 26(A), positioning of the work W can notbe carried out by butting the work W on the butting face 50.Furthermore, in a case where the bending line m and a work end surface Tare not parallel with each other as shown in FIG. 26(B), the positioningaccuracy might be lowered even if the work W is butted on the buttingface 50. The intended bending operation can not be performed in eithercase.

An object of the present invention is to position a work accurately bycarrying out electronic positioning by using image processing, even in acase where mechanical positioning by using a butting face is impossible.

DISCLOSURE OF INVENTION

According to the present invention, regarding predetermined positioningcriteria M₁, M₂, ((G₁, G₂), (N₁, or N₂), (K₁, K₂)), there is provided,as shown in FIG. 1, image processing means (40B) for obtaining by imageprocessing, measured values C_(D1), C_(D2) ((G_(D1), G_(D2)), (N_(D1),or N_(D2)), (K_(D1), K_(D2))) and reference values C_(R1), C_(R2)((G_(R1), G_(R2)). (N_(R1), or N_(R2)), (K_(R1), K_(R2))), and formoving a work (W) in a marker that the measured values C_(D1), C_(D2)((G_(D1), G_(D2)), (N_(D1), or N_(D2)), (K_(D1), K_(D2))) and thereference values C_(R1), C_(R2) ((G_(R1), G_(R2)), (N_(R1), or N_(R2)),(K_(R1), K_(R2))) coincide with each other, thereby positioning the work(W) at a predetermined position.

According to the above structure of the present invention, if it isassumed that the predetermined positioning criteria are, for example,holes M₁ and M₂ (FIG. 2(A)) formed in a work W, outlines G₁ and G₂ (FIG.2(B)), of a work W, a corner N₁ or N₂ (FIG. 2(C)) of a work W, ordistances K₁ and K₂ (FIG. 2(D)) between positions of edges of buttingfaces 15 and 16 and predetermined positions on a work end surface T, awork W supported by a robot 13 can be automatically moved and positionedat a predetermined position by driving the robot 13 via, for example,robot drive means 40C in a manner that measured values C_(D1) and C_(D2)((G_(D1), G_(D2)), (N_(D1), or N_(D2)) (K_(D1), K_(D2))) which areobtained for the above kinds of positioning criteria by image processingvia work photographing means 12 and reference values C_(R1) and C_(R2)((G_(R1), G_(R2)), (N_(R1), or N_(R2)), (K_(R1), K_(R2))) which areobtained by image processing via information (CAD information or thelike) coincide with each other.

Or in a case where the holes M₁ and M₂ (FIG. 2(A)) as the positioningcriteria are quite simple square holes (for example, holes of regularsquares), if the measured values and the reference values are displayedon a screen 40D (FIG. 1), a human worker can position the work W at apredetermined position by seeing the screen 40D and manually moving thework W in a manner that the measured values and the reference valuescoincide with each other.

As a first embodiment, the present invention specifically comprises, asshown in FIG. 3, work image detecting means 10D for detecting an imageDW of a work W which is input from work photographing means 12 attachedto a bending machine 11, work reference image calculating means 10E forcalculating a reference image RW of the work W based on pre-inputinformation, difference amount calculating means 10F for comparing thedetected image DW and the reference image RW and calculating an amountof difference between them, and robot control means 10G for controllinga robot 13 such that the detected image DW and the reference image RWcoincide with each other based on the amount of difference and therebypositioning the work W at a predetermined position.

Therefore, according to the first embodiment of the present invention,by providing, for example, positioning marks M₁ and M₂ constituted byholes at predetermined positions apart from a bending line m on the workW (FIG. 4) as the positioning criteria, the difference amountcalculating means 10F (FIG. 3) can compare detected positioning marksM_(D1) and M_(D2) (FIG. 5(A)) in the detected image DW and referencepositioning marks M_(R1) and M_(R2) in the reference image RW, andcalculate amounts of difference Δθ=θ₀−θ₁ (FIG. 5(A)), Δx=x₁−x₁′(=x₂−x₂′) (FIG. 5(B)), and Δy=y₁−y₁′ (y₂−y₂′) in two-dimensionalcoordinates, regarding positions of centers of gravity of both kinds ofthe marks.

Or, according to another example of the first embodiment of the presentinvention, with the use of, for example, outlines G₁ and G₂ (FIG. 9) ofthe work W as the positioning criteria, the difference amountcalculating means 10F (FIG. 3) can compare detected work outlines G_(D1)and G_(D2) in the detected image DW (FIG. 11(A)) and reference workoutlines G_(R1) and G_(R2) in the reference image RW, and calculateamounts of difference Δθ=tan⁻¹(D₂/L₂) (FIG. 11(A)), Δx=U_(x)+T_(x) (FIG.11(B)), and Δy=U_(y)−T_(y) in two-dimensional coordinates.

Further, according to yet another example of the first embodiment of thepresent invention, with the use of, for example, a corner N₁ or N₂ (FIG.12) as the positioning criterion, the difference amount calculatingmeans 10F (FIG. 3) can compare only one detected corner N_(D2) in thedetected image DW (FIG. 13(A)) and only one corresponding referencecorner N_(R2) in the reference image RW, and calculate amounts ofdifference Δθ (FIG. 13(A)), Δx (FIG. 13(B)), and Δy in two-dimensionalcoordinates.

Accordingly, the Work W can be positioned at a predetermined position bythe robot control means 10G converting the amounts of difference intocorrection drive signals S_(a), S_(b), S_(c), S_(d), and S_(e) so thatthe robot control means 10G can position the bending line m of the workW right under a punch P via the robot 13.

Further, as a second embodiment, the present invention specificallycomprise, as shown in FIG. 15, distance detecting means 30D fordetecting distances K_(D1) and K_(D2) between positions B_(R1) andB_(R2) of the edges of the butting faces 15 and 16 and predeterminedpositions A_(D1) and A_(D2) on a work end surface T_(D) based on a workimage DW input from work photographing means 12 attached to the bendingmachine 11, reference distance calculating means 30E for calculating byimage processing, reference distances K_(R1) and K_(R2) between thepreset positions B_(R1) and B_(R2) of the edges of the butting faces andpredetermined positions A_(R1) and A_(R2) on a work end surface T_(R),distance difference calculating means 30F for comparing the detecteddistances and the reference distances and calculating distancedifferences between them, and robot control means 30F for controlling arobot in a manner that the detected distances and the referencedistances coincide with each other based on the distance differences andthereby positioning the work at a predetermined position.

According to the second embodiment, with the use of distances K₁ and K₂(FIG. 16) between positions of the edges of the butting faces 15 and 16and predetermined positions on a work end surface T as the positioningcriteria, the distance difference calculating means 30F (FIG. 15) cantake differences between detected distances K_(D1) and K_(D2) andreference distances K_(R1) and K_(R2), and calculate distancedifferences Δy₁ and Δy₂ (FIG. 18) in two-dimensional coordinates. Inthis case, in order that the position of the work W on the bendingmachine 11 (FIG. 15) may be fixed uniquely, it is necessary topre-position the work W in a longitudinal direction (X axis direction).For this purpose, the left end (FIG. 24(B)) of the work W supported by agripper 14 of the robot 13 is arranged at a position apart from amachine center MC by X₁, by moving the robot 13 by a predetermineddistance X_(G)=X_(S)−X₁ with the use of, for example, a side gauge 18(FIG. 24(A)).

Under this state, the work W can be positioned at a predeterminedposition by the robot control means 30F (FIG. 15) converting thedistance differences Δy₁ and Δy₂ into correction drive signals S_(a),S_(b), S_(c), S_(d), and S_(e) so that the robot control means 30F canposition a bending line m of the work W right under a punch P via therobot 13.

Due to this, according to the present invention, in a bending machine,even in a case where mechanical positioning by using butting faces isimpossible, a work can be accurately positioned by carrying outelectronic positioning by using the above-described image processing.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is an entire view showing the structure of the present invention;

FIG. 2 are diagrams showing positioning criteria used in the presentinvention;

FIG. 3 is an entire view showing a first embodiment of the presentinvention;

FIG. 4 is a diagram showing positioning marks M₁ and M₂ according to thefirst embodiment of the present invention;

FIG. 5 are diagrams showing image processing according to the firstembodiment of the present invention;

FIG. 6 is a front elevation of a bending machine 11 to which the firstembodiment of the present invention is applied;

FIG. 7 is a side elevation of the bending machine 11 to which the firstembodiment of the present invention is applied;

FIG. 8 is a flowchart for explaining an operation according to the firstembodiment of the present invention;

FIG. 9 is a diagram showing another example (positioning by using workoutlines G₁ and G₂) of the first embodiment of the present invention;

FIG. 10 is a diagram showing an example of a case where a referenceimage RW in FIG. 9 is photographed;

FIG. 11 are diagrams showing image processing in FIG. 9;

FIG. 12 are diagrams showing an example of a case where a detected imageDW and a reference image RW are compared by using corners N₁ and N₂ inthe first embodiment of the present invention;

FIG. 13 are diagrams showing image processing in FIG. 12;

FIG. 14 is a diagram showing another example of FIG. 12;

FIG. 15 is an entire view showing a second embodiment of the presentinvention;

FIG. 16 is a diagram showing positioning criteria K and K according tothe second embodiment of the present invention;

FIG. 17 is a diagram showing a specific example of FIG. 16;

FIG. 18 is a diagram showing image processing according to the secondembodiment of the present invention,

FIG. 19 are diagrams for explaining a post-work positioning operationaccording to the second embodiment of the present invention (measuringof a bending angle Θ);

FIG. 20 are diagrams showing image processing in FIG. 19;

FIG. 21 is a diagram showing work photographing means 12 used in thesecond embodiment of the present invention;

FIG. 22 are diagrams for explaining an operation according to the secondembodiment of the present invention;

FIG. 23 is a flowchart for explaining an operation according to thesecond embodiment of the present invention;

FIG. 24 are diagrams showing positioning of the longitudinal directionof a work, which is carried out prior to positioning by image processingaccording to the second embodiment of the present invention;

FIG. 25 are diagrams for explaining prior art; and

FIG. 26 are diagrams for, explaining another prior art.

BEST MODE FOR CARRYING OUT THE INVENTION

The present invention will now be explained with reference to theattached drawing in order to specifically explain the present invention.

FIG. 3 is an entire view showing a first embodiment of the presentinvention. In FIG. 3, a reference numeral 9 denotes a superordinate NCdevice, 10 denotes a subordinate NC device, 11 denotes a bendingmachine, 12 denotes work photographing means, and 13 denotes a robot.

With this structure, for example, CAD information is input from thesuperordinate NC device 9 to the subordinate NC device 10 which is acontrol device of the bending machine 11 (step 101 in FIG. 8), and theorder of bending is determined (step 102 in FIG. 8). After this, in acase where positioning of a work W by butting faces 15 and 16 (FIG. 6)turns out to be impossible (step 103 in FIG. 8: NO), positioning of thework W is performed by image processing in the subordinate NC device 10(for example, steps 104 to 108 in FIG. 8). Thereafter, bending iscarried out (step 110 in FIG. 8).

In this case, a press brake can be used as the bending machine 11. Aswell known, a press brake comprises a punch P mounted on an upper table20 and a die D mounted on a lower table 21, and carries out by the punchP and the die D, a predetermined bending operation on the work W whichis positioned while being supported by a later-described gripper 14 ofthe robot 13.

The robot 13 is mounted on a base plate 1, and comprises aleftward/rightward direction (X axis direction) drive unit a, aforward/backward direction (Y axis direction) drive unit b, and anupward/downward direction drive unit c. The robot 13 comprises theaforementioned gripper 14 at the tip of its arm 19. The gripper 14 canrotate about an axis parallel with the X axis, and can also rotate aboutan axis parallel with a Z axis. Drive units d and e for such rotationsare built in the arm 19.

With this structure, the robot 13 actuates each of the aforementioneddrive units a, b, c, d, and e when correction drive signals S_(a),S_(b), S_(c), S_(d), and S_(e) are sent from later-described robotcontrol means 10G, so that control for making a detected image DW and areference image RW coincide with each other will be performed (FIG. 5)and the work W will be positioned at a predetermined position.

The press brake (FIG. 6) is equipped with the work photographing means12. The work photographing means 12 comprises, for example, a CCD camera12A and a light source 12B therefor. The CCD camera 12A is attached nearthe upper table 20 for example, and the light source 12B is attachednear the lower table 21 for example.

With this structure, the work W supported by the gripper 14 of the robot13 is photographed by the CCD camera 12A, and the image of the work W isconverted into a one-dimensional electric signal, and further convertedby later-described work image detecting means 10D of the subordinate NCdevice 10 (FIG. 3) into a two-dimensional electric signal, thereby thedetected image DW and the reference image RW are compared with eachother (FIG. 5(A)) by difference amount calculating means 10F.

In this case, in order to photograph, for example, two positioning marksM₁ and M₂ (FIG. 4) provided on the work W as positioning criteria, theCCD camera 12A and its light source 12B are provided in pairs in alateral direction. That is, holes M₁ and M₂ are bored through the work W(FIG. 4) at such predetermined positions apart from a bending line m asto cause no trouble in the bending operation on the work W, by using apunch press, a laser processing machine, or the like in a die cuttingprocess before the bending operation by the press brake.

Or in a case where a great amount of bole information is included in CADinformation, a human worker may arbitrarily designate and determine thepositioning marks M₁ and M₂ on a development displayed on an operatorcontrol panel (10J) of the subordinate NC device 10.

As described above, the holes M₁ and M₂ (FIG. 4) are used as thepositioning marks M₁ and M₂ which are examples of positioning criteria,to provide targets of comparison in a case where, as will be describedlater, the detected image DW of the work W and the reference image RWare compared (FIG. 5(A)) by the difference amount calculating means 10F(FIG. 3).

Consequently, the difference amount calculating means 10F calculatesdifference amounts of detected positioning marks M_(D1) and M_(D2)Δθ=θ₀−θ₁ (FIG. 5(A)), Δx=x₁−x₁′ (=x₂−x₂′) (FIG. 5(B)), and Δy=y₁−y₁′(=y₂−y₂′), with respect to reference positioning marks M_(R1) andM_(R2).

In this case, the positioning marks M₁ and M₂ (FIG. 4) provided on thework W are not necessarily symmetric, but are bored at suchpredetermined positions apart from the bending line m as to cause notrouble in the bending operation on the work W as described above.Accordingly, the CCD camera 12A and its light source 12B provided inpairs laterally can move pair by pair independently.

For example, one pair of CCD camera 12A and light source 12B move in thelateral direction (X axis direction) along X axis guides 7 and 8 by amechanism constituted by a motor M_(AX), a pinion 2, and a rack 3 and bya mechanism constituted by a motor M_(BX), a pinion 4, and a rack 5(FIG. 6), and move in the back and forth direction (Y axis direction)along a Y axis guide 17 by a mechanism constituted by a motor M_(AY) anda ball screw 6 (FIG. 7), independently.

In a case where the positioning marks M₁ and M₂ on the work W are notcircular holes as shown in FIG. 4 but square holes, the detected imageDW and the reference image RW can be compared even if there is only onepositioning mark provided, as will be described later (FIG. 14). In thiscase, either one of the left and right pairs of CCD camera 12A and lightsource 12B are used.

The butting faces 15 and 16 to be used in a case where the positioningof the work W is carried out in a conventional manner (step 103: YES,and step 109 in FIG. 8), are provided at the back of the lower table 21constituting the press brake (FIG. 7).

The aforementioned superordinate NC device 9 (FIG. 3) and thesubordinate NC device 10 are provided as the control devices for thepress brake having the above-described structure. The superordinate NCdevice 9 is installed at an office or the like, and the subordinate NCdevice 10 is attached to a press brake (FIG. 6) in a plant or the like.

Of these devices, the superordinate NC 9 has CAD information storedtherein. The stored CAD information contains work information such asplate thickness, material, length of bending line m (FIG. 4), andpositions of positioning marks M₁ and M₂, etc. regarding a work W, andproduct information such as bending angle, etc. regarding a product.These information items are constructed as a three-dimensional diagramor a development.

The CAD information including these information items is input to thesubordinate NC device 10 (step 101 in FIG. 8), to be used for, forexample, positioning of the work W by image processing of the presentinvention.

The subordinate NC device 10 (FIG. 3) comprises a CPU 10A, informationcalculating means 10B, photographing control means 10C, work imagedetecting means 10D, work reference image calculating means 10E,difference amount calculating means 10F, robot control means 10G,bending control means 10H, and input/output means 10J.

The CPU 10A controls the information calculating means 10B, the workimage detecting means 10D, etc. in accordance with an image processingprogram (corresponding to FIG. 8) of the present invention.

The information calculating means 10B determines information such as theorder of bending, etc. necessary for positioning and bending of the workW, by calculation based on the CAD information input from thesuperordinate NC device 9 via the input/output means 10J to be describedlater (step 102 in FIG. 8).

The information determined by calculation of the information calculatingmeans 10B includes, in addition to the order of bending, molds (punch Pand die D) to be used, mold layout indicating which mold is arranged atwhich position on the upper table 20 and lower table 21, and a programof the movements of the robot 13 which positions and feeds the work Wtoward the press brake.

Due to this, it is determined, for example, whether positioning of thework W by the butting faces 15 and 16 is possible or not (step 103 inFIG. 8). In a case where it is determined as impossible (NO),positioning of the work W by using image processing of the presentinvention is to be performed (steps 104 to 108 in FIG. 8).

The photographing control means 10C performs control for moving the workphotographing means 12 constituted by the aforementioned CCD camera 12Aand light source 12B based on the order of bending, mold layout,positions of the positioning marks M₁ and M₂, etc. determined by theinformation calculating means 10B, and controls the photographingoperation of the CCD camera 12A such as control of the view range (FIG.5(A)).

The work image detecting means 10D (FIG. 3) converts an image of thework W including the positioning marks M₁ and M₂ which image isconstituted by a one-dimensional electric signal sent from the workphotographing means 12 into a two-dimensional electric signal, asdescribed above.

Due to this, a detected image DW (FIG. 5(A)) of the work W is obtained.The positioning marks M₁ and M₂ (FIG. 4) on the work W are used as thetargets of comparison with later-described reference positioning marksM_(R1) and M_(R2), as detected positioning marks M_(D1) and M_(D2) (FIG.5(A)).

The positions of the centers C_(D1) and C_(D2) of gravity of thedetected positioning marks M_(D1) and M_(D2) in two-dimensionalcoordinates will be represented herein as indicated below.Positions of centers of gravity C_(D1)(x₁′,y₁′),C_(D2)(x₂′,y₂′)  {circlearound (1)}

The deflection angle θ₁ of the detected positioning marks M_(D1) andM_(D2) can be represented as below based on {circle around (1)}.Deflection angle θ₁=tan⁻¹ {(y ₂ ′−y ₁′)/(x ₂ ′−x ₁′)}  {circle around(2)}

{circle around (1)} and {circle around (2)} will be used when thedifference amount calculating means 10F calculates a difference amount,as will be described later.

The work reference image calculating means 10E calculates a referenceimage RW including reference positioning marks M_(R1) and M_(R2) (FIG.5(A)), based on the order of bending, mold layout, positions of thepositioning marks M₁ and M₂ determined by the information calculatingmeans 10B.

In this case, the positions of the centers C_(R1) and C_(R2) of gravityof the reference positioning marks M_(R1) and M_(R2) in two-dimensionalcoordinates will be likewise represented as below.Positions of centers of gravity C_(R1)(x₁,y₁),C_(R2)(x₂,y₂)  {circlearound (3)}

The deflection angle θ₀ of the reference positioning marks M_(R1) andM_(R2) can be represented as below based on {circle around (3)}.Deflection angle θ₀=tan⁻¹ {(y ₂−y₁)/(x ₂ −x ₁)}  {circle around (4)}

{circle around (3)} And {circle around (4)} will be likewise used whenthe difference amount calculating means 10F calculates a differenceamount.

The difference amount calculating means 10F receives the detected imageDW and reference image RW including the detected positioning marksM_(D1) and M_(D2), and reference positioning marks M_(R1) and M_(R2)having positions of centers of gravity and deflection angles which canbe represented by the above-described expressions {circle around (1)} to{circle around (4)}, and calculates a difference amount from thedifference between them.

For example, an amount of difference Δθ in angle, of the detectedpositioning marks M_(D1) and M_(D2) with respect to the referencepositioning marks M_(R1) and M_(R2) is represented as below based on{circle around (2)} and {circle around (4)}.Difference amount Δθ=θ₀−θ₁  {circle around (5)}

Therefore, by rotating the detected image DW by the difference amount Δθrepresented by {circle around (5)}, the detected image DW and thereference image RW become parallel with each other, as shown in FIG.5(B).

Accordingly, a difference amount Δx in the X axis direction and adifference amount Δy in the Y axis direction are represented as below.Difference amount Δx in the X axis direction=x ₁ −x ₁′(=x ₂ −x₂′)  {circle around (6)}Difference amount Δy in the Y axis direction=y ₁ −y ₁′(=y ₂ −y₂′)  {circle around (7)}

The robot control means 10G (FIG. 3) controls the robot 13 such that thedetected image DW and the reference image RW coincide with each otherbased on the difference amounts represented by the equations {circlearound (5)} to {circle around (7)}, thereby positioning the work W at apredetermined position.

That is, when the robot control means 10G receives difference amountsΔθ, Δx, and Δy from the difference amount calculating means 10F, therobot control means 10G converts these into correction drive signalsS_(a), S_(b), S_(c), S_(d), and S_(e), and sends each signal to therobot 13.

Thus, the robot 13 rotates the work W supported by the gripper 14 by thedifference amount Δθ=θ₀−θ₁ (FIG. 5(A)), and after this, moves the work Wby the difference amount Δx=x₁−x₁′ (=x₂−x₂′) and the difference amountΔy=y₁−y₁′ (=y₂−y₂′) in the X axis direction and in the Y axis direction(FIG. 5(B)), by actuating respective drive units a, b, c, d, and econstituting the robot 13.

That is, a control for making the detected image DW and the referenceimage RW coincide with each other is performed, thereby the work W canbe fixed at a predetermined position.

The bending control means 10H (FIG. 3) controls the press brake based onthe order of bending, etc. determined by the information calculatingmeans 10B, and applies bending operations by the punch P and die D onthe position-fixed work W.

The input/output means 10J is provided near the upper table 20constituting the press brake (FIG. 6) for example, and comprises akeyboard and a screen made of liquid crystal, etc. The input/outputmeans 10J functions as interface with respect to the aforementionedsuperordinate NC device 9 (FIG. 3), and thereby the subordinate NCdevice 10 is connected to the superordinate NC device 9 by cable or byradio and the CAD information can be received therefrom.

Further, the input/output means 10J displays the information determinedby the information calculating means 10B such as the order of bendingand the mold layout, etc. on the screen thereof, to allow a human workerto see the display. Therefore, the determination whether positioning ofthe work W by the butting faces 15 and 16 is possible or not (step 103in FIG. 8) can be done by the human worker, not automatically.

FIG. 9 to FIG. 11 are for the case where outlines G₁ and G₂ (FIG. 9) ofthe work W are used instead of the aforementioned positioning marks M₁and M₂ (FIG. 4) as the positioning criteria. As will be described later,the difference amount calculating means 10F (FIG. 3) uses the workoutlines G₁ and G₂ as the targets of comparison when a detected image DWof the work W and a reference image RW are compared with each other(FIG. 11).

Thus, the difference amount calculating means 10F calculates differenceamounts Δθ, Δx and Δy of detected work outlines G_(D1) and G_(D2) withrespect to reference work outlines G_(R1) and G_(R2), by Δθ=tan⁻¹(D₂/L₂)(FIG. 11(A)), Δx=U_(x)+T_(x) (FIG. 11(B)), and Δy=U_(y)−T_(y).

In this case, the reference work outlines G_(R1) and G_(R2) are preparedby photographing the work W which is fixed at a predetermined positionby a human worker by the CCD camera 12A and storing the image in amemory.

For example, in a case where a corner of the work W (FIG. 10) is to bebent, side stoppers 25 and 26 are attached to a holder 22 of the die Dvia attaching members 23 and 24, and checkers A, B, and C are preparedon the side stoppers 25 and 26.

In this state, the human worker makes the work outlines G₁ and G₂ abuton the side stoppers 25 and 26, so that the work outlines G₁ and G₂together with the checkers A, B, and C are photographed by the CCDcamera 12A. Then, the image of the work outlines G₁ and G₂, and thecheckers A, B, and C is converted into a one-dimensional electricsignal, and further converted by the work image detecting means 10D ofthe subordinate NC device 10 (FIG. 3) into a two-dimensional electricsignal, thereby the photographed image is stored in the memory of thework reference image calculating means 10E.

Then, the difference amount calculating means 10F uses the image of thework outlines G₁ and G₂ stored in the memory as the reference workoutlines G_(R1) and G_(R2) (FIG. 11), and the image of the checkers A,B, and C stored in the memory as areas for detecting image data, therebythe detected image DW and the reference image RW are compared with eachother.

That is, in FIG. 11, the reference image RW indicated by a broken lineincludes the reference work outlines G_(R1) and G_(R2) stored in thememory of the work reference image calculating means 10E, and thedetected image DW indicated by a solid line includes the detected workoutlines G_(D1) and G_(D2) which is obtained by photographing the work Wsupported by the gripper 14 of the robot 13 by the CCD camera 12A.

In this case, let it be assumed that in two-dimensional coordinates ofFIG. 11(A), x-axis-direction-coordinates of the checkers A and B arex_(a) and x_(b), the intersection of one reference work outline G_(R1)and the checker A is a first reference point R₁(x_(a), y_(a)), theintersection of the one reference work outline G_(R1) and the checker Bis a second reference point R₂(x_(b), y_(b)), the intersection of onedetected work outline G_(D1) and the checker A is E(x_(a), y_(a)′), andthe intersection of the one detected work outline G_(D1) and the checkerB is F(x_(b), y_(b)′).

In FIG. 11(A), a variation D_(a) in the Y axis direction, of thedetected work outline G_(D1) with respect to the first reference pointR₁(x_(a), y_(a)), and a variation D_(b) in the Y axis direction, of thedetected work outline G_(D1) with respect to the second reference pointR₂(x _(b), y_(b)) are respectively represented as below.D _(a) =R ₁(x _(a) ,y _(a))−E(x _(a) ,y _(a)′)=y _(a) −y _(a)′  (1)D _(b) =F(x _(b) ,y _(b)′)−R ₂(x _(b) ,y _(b))=y _(b) ′−y _(b)  (2)

Accordingly, if it is assumed that the intersection of a line H which isdrawn parallel with the detected work outline G_(D1) and the checker Ais S, a distance D₁ between the intersection S and the first referencepoint R₁(x_(a), y_(a)) can be represented as below by using D_(a) andD_(b) in the above (1) and (2).D ₁ =D _(a) −D _(b)  (3)

Here, if it is assumed that a deflection angle of the reference workoutline G_(R1) with respect to the Y axis direction is θ (FIG. 11(A)), adistance D between an intersection K of the reference work outline G andits perpendicular line V, and the intersection S can be represented asbelow by using the deflection angle θ and D in the above (3), as obviousfrom FIG. 11(A).D ₂ =D ₁×sin θ  (4)

Further, if it is assumed that a distance between the checkers A and Bin the X axis direction is L₁=x_(b)−x_(a), a distance P between thefirst reference point R₁(x_(a), y_(a)) and the second reference pointR₂(x_(b), y_(b)) can be represented as below by using L₁ and thedeflection angle θ, and a distance Q between the first reference pointR₁(x_(a), y_(a)) and the intersection K can be represented as below byusing D₁ in the above (3) and likewise the deflection angle θ.P=L ₁/sin θ  (5)Q=D ₁×cos θ  (6)

Accordingly, a distance L₂ between the second reference point R₂(x_(b),y_(b)) and the intersection K can be represented as below, because asobvious from FIG. 11(A), L₂ is the sum of P and Q which can berepresented by the above (5) and (6).L ₂ =P+Q=L ₁/sin θ+D ₁×cos θ  (7)

Accordingly, an amount of difference Δθin angle, of the detected workoutline G_(D1) with respect to the reference work outline G_(R1) isrepresented as below.Δθ=tan⁻¹(D ₂ /L ₂)  (8)

In the above (8), D₂ and L₂ can be represented by (4) and (7)respectively. Therefore, the difference amount Δθ can be represented byD₁, L₁, and θ by inputting (4) and (7) in (8).Δθ=tan⁻¹(D ₂ /L ₂)=tan⁻¹ {D ₁×sin θ/(L ₁/sin θ+D ₁×cos θ)}  (9)

If it is assumed that the deflection angle θ of the reference workoutline G_(R1) with respect to the Y axis direction is 45°, the above(9) becomes tan⁻¹ {D₁/(2×L₁+D₁)}, and thus can be represented moresimply.

If the detected image DW is rotated about the intersection F (x_(b),y_(b)′) between the detected image DW and the checker B by thedifference amount Δθ represented by (9), the detected image DW and thereference image RW becomes parallel with each other as shown in FIG.11(B).

In this case, in the two-dimensional coordinates of FIG. 11(B), thesecond reference point R₂(x _(b), y_(b)) which is the intersectionbetween one reference work outline G_(R1) and the checker B, and theintersection F(x_(b), y_(b)′) between one detected work outline G_(D1)and the checker B are the same as those in the case of FIG. 11(A).

Accordingly, a distance T between the detected work outline G_(D1) andthe reference work outline G_(R1) which are parallel with each other canbe represented as below by using the variation D_(b) and the deflectionangle θ.T=D _(b)×sin θ  (10)

The X-axis-direction component T_(x) and Y-axis-direction componentT_(y) of T are obtained as below.T _(x) =T×cos θ=D _(b)×sin θ×cos θ  (11)T _(y) =T×sin θ=D _(b)×sin² θ  (12)

In the two-dimensional coordinates of FIG. 11(B), it is assumed that thex-axis-direction coordinate of the checker C is x_(c), the intersectionbetween the other reference work outline G_(R2) and the checker C is athird reference point R₃(x _(c), y_(c)), and the intersection betweenthe other detected work outline G_(D2) and the checker C is J(x _(c),y_(c)′).

In this case, in FIG. 11 (B), a variation D_(c) in the Y axis direction,of the other detected work outline G_(D2) with respect to the thirdreference point R₃(x _(c), y_(c)) is represented as below.D _(c) =R ₃(x _(c) ,y _(c))−J(x _(c) ,y _(c)′)=y _(c)−y_(c)′  (13)

Accordingly, a distance U between the detected work outline G_(D2) andthe reference work outline G_(R2) which are parallel with each other canbe represented as below by using the variation D_(c) which can berepresented by the above (13) and the deflection angle θ.U=D _(c)×cos θ  (14)

The X-axis-direction component U_(x) and Y-axis-direction componentU_(y) of U are obtained as below.U _(x) =U×sin θ=D _(c)×sin θ×cos θ  (15)U _(y) =U×cos θ=D _(c)×con²θ  (16)

Accordingly, a difference amount in the X axis direction and adifference amount Δy in the Y axis direction can be represented as belowby using U_(x) and U_(y) which can be represented by (15) and (16) andT_(x) and T_(y) which can be represented by the above (11) and (12).

$\begin{matrix}{\begin{matrix}{{{Difference}\mspace{14mu}{amount}\mspace{14mu}\Delta\; x}\mspace{14mu}} \\{{in}\mspace{14mu}{the}\mspace{14mu} X\mspace{14mu}{axis}\mspace{14mu}{direction}}\end{matrix} = {{U_{x} + T_{x}} = {\left( {D_{c} + D_{b}} \right) \times \sin\;\theta \times \cos\;\theta}}} & (17) \\{\begin{matrix}{{{Difference}\mspace{14mu}{amount}\mspace{14mu}\Delta\; y}\mspace{14mu}} \\{{in}\mspace{14mu}{the}\mspace{14mu} Y\mspace{14mu}{axis}\mspace{14mu}{direction}}\end{matrix} = {{U_{y} - T_{y}} = {{D_{b} \times \sin^{2}\;\theta} - {D_{c} \times {con}^{2}\;\theta}}}} & (18)\end{matrix}$

Therefore, in a case where the work outlines G and G in FIG. 9 to FIG.11 are used as the positioning criteria, the robot control means 10G(FIG. 3) controls the robot 13 such that the detected image DW and thereference image RW coincide with each other based on the differenceamounts which can be represented by (9), (17) and (18), thereby fixingthe work W at a predetermined position.

FIG. 12 to FIG. 14 are for the case where either a corner N₁ or a cornerN₂ (FIG. 12) of a work W is used as a positioning criterion instead ofthe above-described positioning marks M₁ and M₂ (FIG. 4) and outlines G₁and G₂ of a work W (FIG. 9). The difference amount calculating means 10F(FIG. 3) uses either the corner N₁ or the corner N₂ as the target ofcomparison when a detected image DW of the work W and a reference imageRW are compared with each other (FIG. 13).

With this structure, if one work photographing means 12 (FIG. 3), i.e.one CCD camera 12A photographs only either the corner N₁ or N₂, thedifference amount calculating means 10F (FIG. 3) can calculatedifference amounts Δθ (FIG. 13(A)), Δx (FIG. 13(B)), and Δy of an entiredetected corner N_(D2) with respect to an entire reference cornerN_(R2).

Accordingly, the robot control means 30G (FIG. 3) can position the workW at a predetermined position by controlling the robot 13 such that thedetected image DW and the reference image RW coincide with each other atone time, based on the difference amounts Δθ, Δx, and Δy.

That is, in case of the positioning marks M₁ and M₂ (FIG. 4), or theoutlines G₁ and G₂ (FIG. 9) of the work W, positioning of the work W cannot be carried out unless the positions of the two positioning marks M₁and M₂ or the positions of the two work outlines G₁ and G₂ aredetermined with the use of two CCD cameras 12A, in order to compare thedetected image DW and the reference image RW (FIG. 5, FIG. 11).

However, for such a positioning operation of a work W by imageprocessing as the present invention, the case that the corner N₁ or N₂is used as the target of comparison when the detected image DW and thereference image RW are compared is very frequent, accounting for nearly80% of all.

Therefore, as will be described later, if the position of either thecorner N₁ or N₂ is determined by using only one CCD camera 12A,comparison of the detected image DW and the reference image RW becomesavailable, and positioning of the work W by image processing can becarried out with only one time of difference amount correction.Accordingly, the efficiency of the entire operation including thepositioning of the work W will be greatly improved.

The outline of the work W shown in FIG. 12(A) can be first raised as anexample where, as described above, an entire view of either the cornerN₁ or N₂ is photographed to be used as the target of comparison betweenthe detected image DW and the reference image RW.

In this case, the angle of the corner N₁ or N₂ may be anything, such asan acute angle, an obtuse angle, and a right angle, or may be R (FIG.12(B)).

However, difference amounts, in particular, the difference amount Δθ inthe angular direction (FIG. 13) can not be corrected unless the cornerN₁ or N₂ is not partly, but entirely photographed by the CCD camera 12A.

An example of a case where the detected image DW and the reference imageRW are compared with the use of such corners N₁ and N₂, will now beexplained based on FIG. 13.

In FIG. 13(A), if an image of the entire corner N₂ which is photographedby, for example, the CCD camera 12A on the right side is input to thework image detecting means 10D (FIG. 3), a detected corner N_(D2) as apart of the detected image DW can be obtained.

Accordingly, if this detected corner N_(D2) is input to the differenceamount calculating means 10F together with a reference corner N_(R2)which is pre-calculated by the work reference image calculating means10E (FIG. 3), an amount of difference Δθ in the angular directionbetween the entire detected corner N_(D2) and the entire referencecorner N_(R2) is calculated.

Then, the detected corner N_(D2) is rotated by the calculated amount ofdifference Δθ in the angular direction, such that the detected image DW(FIG. 13(B)) including the detected corner N_(D2) and the referenceimage RW including the reference corner N_(R2) become parallel with eachother.

Due to this, the difference amount calculating means 10F (FIG. 3) cancalculate amounts of difference Δx and Δy in the Y axis directionbetween the entire detected corner N_(D2) (FIG. 13(B)) and the entirereference corner N_(R2).

Accordingly, by rotating, via the robot control means 30G (FIG. 3), thework W supported by the gripper 14 (FIG. 13) of the robot 13 by theamount of difference Δθ, and moving the work W by the amounts ofdifference Δx and Δy in the W axis direction and in the Y axisdirection, a control for making the detected image DW and the referenceimage RW coincide with each other is performed, thereby the work W canbe positioned at a predetermined position.

Square holes M₁ and M₂ shown in FIG. 14 are an example of using eitherthe corner N₁ or N₂ as the target of comparison between the detectedimage DW and the reference image RW.

For example, in a case where the square holes M₁ and M₂ are formed aspositioning marks at predetermined positions y1 and y2 apart from abending line m (FIG. 14), the entire view of either the corner N₁ or N₂is photographed by the CCD camera 12A.

Then, for example, the image of the entire corner N₂ which isphotographed by the CCD camera 12A on the right side of FIG. 14 is usedas a detected corner N_(D2) (corresponding to FIG. 13), so as to becompared with a pre-calculated reference corner N_(R2).

Due to this, a difference amount Δθ in the angular direction, adifference amount Δx in the X axis direction, and a difference amount Δyin the Y axis direction are likewise calculated by the difference amountcalculating means 10F (FIG. 3). Based on these difference amounts, therobot control means 30G performs a control for making the detected imageDW and the reference image RW coincide with each other, thereby the workW can be positioned at a predetermined position.

An operation according to a first embodiment of the present inventionhaving the above-described structure will now be explained based on FIG.8.

(1) Determination Whether Positioning of a Work W by the Butting Faces15 and 16 is Possible or Not.

CAD information is input in step 101 of FIG. 8, the order of bending,etc. is determined in step 102, and whether positioning of the work W bythe butting faces 15 and 16 is possible or not is determined in step103.

That is, when CAD information is input from the superordinate NC device9 (FIG. 3) to the subordinate NC device 10, the information calculatingmeans 100B constituting the superordinate NC device 9 determines theorder of bending, etc. Based on the determined information, it isdetermined whether positioning of the work W by the butting faces 15 and16 is possible, automatically (for example, determination by theinformation calculating means 10B in accordance with an instruction ofthe CPU 10A) or manually (determination by a human worker by seeing thescreen of the input/output means 10J, as described before).

In a case where positioning by the butting faces 15 and 16 is possible(step 103 of FIG. 8: YES), the flow goes to step 109, so thatpositioning is carried out conventionally by butting the work W on thebutting faces 15 and 16.

However, in a case where positioning by the butting faces 15 and 16 isimpossible (step 103 of FIG. 8: NO), the flow goes to step 104sequentially, so that positioning by using image processing according tothe present invention is carried out.

(2) Positioning Operation by Using Image Processing.

A reference image RW of the work W is calculated in step 104 of FIG. 8.An image of the work W is detected in step 105. The detected image DWand the reference image RW are compared in step 106. Whether or notthere is any difference between them is determined in step 107.

That is, in such a case as this where positioning by the butting faces15 and 16 is impossible, the work reference image calculating means 10Epre-calculates the reference image RW (FIG. 5A) based on thedetermination by the information calculating means 10B, and stores it ina memory (not illustrated) or the like.

In this state, the CPU 10A of the subordinate NC device 10 (FIG. 3)moves the CCD camera 12A and its light source 12B both constituting thework photographing means 12 via the photographing control means 10C, inorder to photograph the work W supported by the gripper 14 of the robot13.

The photographed image of the work W is sent to the work image detectingmeans 10D, thereby the detected image DW is obtained and subsequentlycompared (FIG. 5A) with the reference image RW stored in the memory bythe difference amount calculating means 10F.

Then, the difference amount calculating means 10F calculates amounts ofdifference ({circle around (5)} to {circle around (7)} aforementioned)between the detected image DW and the reference image RW. When theseamounts of difference are zero, i.e. when there is no difference betweenthem (step 107 in FIG. 6: NO), the positioning is completed, and thebending operation is carried out in step 110.

However, in a case where there is difference between the detected imageDW and the reference image RW (step 107 in FIG. 8: YES), positioning ofthe work W by the robot 13 is performed in step 108.

That is, in a case where there is difference between the detected imageDW and the reference image RW (FIG. 5(A)), the difference amountcalculating means 10F sends the calculated difference amounts ({circlearound (5)} to {circle around (7)}) to the robot control means 10G.

Then, the robot control means 10G converts the difference amounts({circle around (5)} to {circle around (7)}) into correction drivesignals S_(a), S_(b), S_(c), S_(d), and S_(e) and sends these signals tothe robot 13, so that the drive units a, b, c, d, and e of the robot 13will be controlled such that the detected image DW and the referenceimage RW coincide with each other (FIG. 5(B)) and the work W ispositioned at a predetermined position.

In a case where positioning of the work W by the robot 13 is carried outin this manner, the flow returns to step 105 of FIG. 8 after thispositioning, in order to again photograph the image of the positionedwork W by the CCD camera 12A for confirmation. After photographing, thephotographed image is detected by the work image detecting means 10D,and compared with the reference image RW in step 106. Then, in a casewhere it is determined in step 107 that there is no difference betweenthem (NO), positioning is finally completed and the flow goes to step110.

(3) Bending Operation.

In a case where the difference amount calculating means 10F whichreceives the detected image DW (FIG. 3) and the reference image RWdetermines that there is no difference between them, this message istransmitted from the difference amount calculating means 10F to the CPU10A. The CPU 10A actuates a ram cylinder (not illustrated), etc. via thebending control means 10H, so that the bending operation is carried outon the work W supported by the gripper 14 of the robot 13 by the punch Pand die D.

In a case where positioning is carried out by butting the work W on thebutting faces 15 and 16 as conventionally (step 109 in FIG. 8), apositioning completion signal is sent from a sensor (not illustrated)attached to the butting faces 15 and 16 to the CPU 10A. Based on thissignal, the ram cylinder is actuated via the bending control means 10Hlikewise the above, and the work W supported by the gripper 14 of therobot 13 is subjected to the bending operation by the punch P and die E.

(4) Positioning Operation in Case of Using the Work Outlines G₁ and G₂.

That is, also in case of the positioning operation by using the workoutlines G₁ and G₂ shown in FIG. 9 to FIG. 11 as the positioningcriteria, the procedures shown in FIG. 8 are followed in exactly thesame manner as the case of using the positioning marks M₁ and M₂ (FIG.4).

However, the difference between the cases is that as for the positioningmarks M₁ and M₂ (FIG. 4), image data constituting the referencepositioning marks M_(R1) and M_(R2) (FIG. 5) is included in the CADinformation stored in the superordinate NC device 9 (FIG. 3) asdescribed above, while as for the work outlines G₁ and G₂ (FIG. 9),image data constituting the reference work outlines G_(R1) and G_(R2)(FIG. 11) is not included in the CAD information, but obtained by ahuman worker positioning the work W at a predetermined position (forexample, FIG. 10) to photograph the work outlines G₁ and G₂ by the CCDcamera 12A.

However, the reference work outlines G_(R1) and G_(R2) may be includedin the CAD information likewise the reference positioning marks M_(R1)and M_(R2).

(5) Positioning Operation in Case of Using the Corners N₁ and N₂ of aWork W.

That is, also in case of the positioning operation by using the cornersN₁ and N₂ shown in FIG. 12 to FIG. 14 as the positioning criteria, theprocedures shown in FIG. 8 are followed in exactly the same manner asthe case of using the positioning marks M₁ and M₂ (FIG. 4) or the workoutlines G₁ and G₂ (FIG. 9).

However, as described above, unlike the positioning marks M₁ and M₂(FIG. 4), etc., comparison between the detected image DW and thereference image RW by image processing (FIG. 13) is available, only byphotographing the image of either the corner N₁ (FIG. 12) or N₂ by oneCCD camera 12A. Then, the work W can be positioned at a predeterminedposition by correcting the difference amounts Δθ, Δx, and Δy at onetime. Accordingly, the efficiency of the entire operation is improved.

FIG. 15 is an entire view showing a second embodiment of the presentinvention.

In FIG. 15, a reference numeral 29 denotes a superordinate NC device, 30denotes a subordinate NC device, 11 denotes a bending machine, 12denotes a work photographing means, and 13 denotes a robot.

With this structure, for example, CAD information is input from thesuperordinate NC device 29 to the subordinate NC device 30 which is acontrol device of the bending machine 11 (step 201 in FIG. 23), andsetting of the positions B_(R1) and B_(R2) of the edges of butting faces15 (FIG. 18) and 16 and predetermined positions A_(R1) and A_(R2) on theend surface T_(R) of a work image RW is carried out (steps 202 to 204 inFIG. 23). After this, positioning of a work W by predetermined imageprocessing is carried out by the subordinate NC device 30 (steps 205 to208 in FIG. 23). After the punch P (FIG. 19 (B)) contacts the work W(after pinching point), a bending angle Θ is indirectly measured bydetecting a distance k₁ between the work W and the butting face 15, andthen the bending operation is carried out (steps 209 to 213 in FIG. 23).

Due to this, positioning of the work W and measuring of the bendingangle Θ can be carried out by one device, making it possible to simplifythe system.

In this case, the bending machine 11 (FIG. 15) and the robot 13 are thesame as the first embodiment (FIG. 3). However, the positions at whichthe CCD camera 12A and its light source 12B constituting the workphotographing means 12 are attached, and their moving mechanism aredifferent from the first embodiment.

That is, as described above, the butting faces 15 and 16 are providedbehind the lower table 21 which constitutes the press brake.

As shown in FIG. 21, for example, the butting face 15 is attached to astretch 27 via a butting face body 28. According to the secondembodiment, the CCD camera 12A is attached to this butting face body 28.

Further, an attaching plate 28A is provided to the butting face body 28,and the light source 12B for supplying a permeation light to the work Wis attached to the attaching plate 28A.

Due to this, as the butting face 15 moves in the X axis direction, Yaxis direction, or Z axis direction, the CCD camera 12A and the lightsource 12B move in the same direction. Therefore, there is no need ofproviding a special moving mechanism for the CCD camera 12A and itslight source 12B unlike the first embodiment (FIG. 3), thereby enablingcost cut.

Further, with this structure, the work W supported by the gripper 14 ofthe robot 13 (FIG. 15) is photographed by the CCD camera 12A, and theimage of the work W is converted into a one-dimensional electric signal,and then converted into a two-dimensional electric signal bylater-described distance detecting means 30D of the subordinate NCdevice 30 (FIG. 15). Thereby, the distances K_(D1) and K_(D2) betweenthe positions B_(R1) and B_(R2) (FIG. 18) of the edges of the buttingfaces 15 and 16 and predetermined positions A_(D1) and A_(D2) on an endsurface T_(D) of the work image DW are detected, and differences indistance Δy₁ and Δy₂ between the detected distances K_(D1) and K_(D2)and reference distances K_(R1) and K_(R2) are calculated (FIG. 18) by adistance difference calculating means 30F (FIG. 15).

In the second embodiment, distances K₁ and K₂ between the positions ofthe edges of the butting faces 15 and 16 and predetermined positions onthe work end surface T are used as the positioning criteria as shown inFIG. 16. These positioning criteria are especially effective inpositioning the work W in case of diagonal bending where the work endsurface T and a bending line m are not parallel with each other.

In some cases, the work end surface T has a very complicated form asshown in FIG. 17. In order to accurately detect the distances K₁ and K₂from the butting faces 15 and 16, it is necessary to set in advance thepositions B₁ and B₂ of the edges of the butting faces 15 and 16, andpredetermined positions A₁ and A₂ on the work end surface T as thedetection points.

Specifically, for example, with the input of CAD information (step 201in FIG. 23), the work image RW as a development is obtained as shown inFIG. 18, and is displayed on the screen.

Then, a human worker sets the positions B_(R1) and B_(R2) of the edgesof the butting faces 15 and 16, and also sets the predeterminedpositions A_(R1) and A_(R2) on the end surface T_(R) of the work imageRW, by looking at this screen (step 202 in FIG. 23). In this case, asdescribed above, the position of the longitudinal direction (X axisdirection) of the work W is determined such that the left end of thework W is arranged at a position apart from a machine center MC by X₁.For example, in a state where the work W (FIG. 24 (A)) is supported bythe gripper 14 of the robot 13, the left end of the work W is butted onthe side gauge 18. If the position of the side gauge 18 at this time isassumed to be apart from the machine center MC by X_(S), the left end ofthe work W can be arranged at the position apart from the machine centerMC by X₁, by moving the robot 13 (FIG. 24(B)) by a predetermineddistance X_(O)=X_(S)−X₁ to make a work origin O coincide with themachine center MC. Due to this, as will be described later, thepositions of the forward/backward direction (Y axis direction) andleftward/rightward direction (X axis direction) of the work W aredetermined, thereby the position of the work W with respect to thebending machine 11 is determined uniquely.

In this case, the number of positions to be set may be at least one, ormay be two with respect to, for example, the work origin O, asillustrated.

When the detection points are set in this manner, the referencedistances K_(R1) and K_(R2) between the positions B_(R1) and B_(R2) ofthe edges of the butting faces 15 and 16 and predetermined positionsA_(R1) and A_(R2) which are set as described above are automaticallycalculated by later-described reference distance calculating means 30Econstituting the subordinate NC device 30 (FIG. 15) (step 203 in FIG.23). As described above, the reference distances K_(R1) and K_(R2) areused by the distance difference calculating means 30F (FIG. 15) as thetargets for calculating the distance differences Δy₁ and Δy₂ withrespect to the detected distances K_(D1) and K_(D2) (FIG. 15).

In this case, the reference distances K_(R1) and K_(R2) may be input bya human worker manually. The positions B_(R1) and B_(R2) of the edges ofthe butting faces 15 and 16 (FIG. 18) and predetermined positions A_(R1)and A_(R2) on the work end surface T_(R) which are set as describedabove are the detection points for detecting distances with respect tothe butting faces 15 and 16 in positioning the work W, and also thedetection points for detecting a distance with respect to the buttingface 15 in measuring the, bending angle Θ, as will be described later.

The operation of the second embodiment will be as illustrated in FIG.22, by carrying out the positioning of the work W and the measuring ofthe bending angle Θ by using one device as described above.

In FIGS. 22(A), (B), and (C), the drawings on the left side show thepositional relationship between the work W and the CCD camera 12A, andthe drawings on the right side show the distance between the work imageDW or dw which are image-processed via the CCD camera 12A and thebutting face 15.

Among these drawings, the drawing on the right side of FIG. 22(A) showsa state where the distance K_(D1) between the predetermined positionA_(D1) on the end surface T_(D) of the work image DW and the positionB_(R1) of the edge of the butting face 15 becomes equal to the referencedistance K_(R1) and thereby the work positioning is completed. Thisdrawing corresponds to FIG. 18.

The drawings on the right side of FIGS. 22(B) and (C) show a state wherea distance k_(d1) between a predetermined position a_(d1) on an endsurface t_(d) of the work image dw and the position B_(R1) of the edgeof the butting face 15 changes after the punch P (the drawing on theleft side of FIG. 22(B)) contacts the work W (after pinching point).These drawings correspond to FIG. 20.

In FIG. 22, after the positioning of the work W is completed (FIG.22(A)), and then the punch P contacts the work W (FIG. 22(B)), thedistance k_(d1) with respect to the butting face 15 becomes larger asthe bending operation progresses (the drawing on the right side of FIG.22(B)).

At this time, the edges of the work W rise upward (the drawing on theleft side of FIG. 22(B)). Therefore, the image dw of the work W isdetected by raising the butting face 15 upward in response to the risingof the work W thereby to raise the CCD camera 12A.

When the punch P further drops downward (the drawing on the left side ofFIG. 22 (C)) and the distance k_(d1) (the drawing on the right side ofFIG. 22(C)) with respect to the butting face 15 becomes equal to apredetermined distance k_(r1), it is determined that the work W is bentto the predetermined bending angle Θ (the drawing on the left side ofFIG. 22(C)), and the ram is stopped. Thus, the bending operation iscompleted.

The subordinate NC device 30 (FIG. 15), which is a control device forthe press brake having the above-described structure, comprises a CPU30A, information calculating means 30B, photographing control means 30C,distance detecting means 30D, reference distance calculating means 30E,distance difference calculating means 30F, robot control means 30G,bending control means 30H, and input/output means 30J.

The CPU 30A controls the information calculating means 30B, the distancedetecting means 30D, etc. in accordance with an image processing program(corresponding to FIG. 23) of the present invention.

The information calculating means 30B calculates information necessaryfor the positioning of the work W and measuring of the bending angle Θsuch as an order of bending and the shape of a product, etc. based onCAD information input from the superordinate NC device 29 via theinput/output means 30J.

The photographing control means 30C moves the work photographing means12 constituted by the CCD camera 12A and the light source 12B via theaforementioned moving mechanism for the butting faces 15 and 16 based onthe information calculated by the information calculating means 30B, andcontrols the photographing operation such as the control of the viewrange (FIG. 16, FIG. 17) of the CCD camera 12A.

The distance detecting means 30D detects distances K_(D1) and K_(D2)between the positions B_(R1) and B_(R2) of the edges of the buttingfaces 15 and 16 and predetermined positions A_(D1) and A_(D2) on thework end surface T_(D).

That is, as described above (FIG. 18), the positions B_(R1) and B_(R2)of the edges of the butting faces 15 and 16 which are set in advance onthe screen are to be represented as below in two-dimensionalcoordinates.Positions of edges B_(R1)(x₁,y₁′),B_(R2)(x₂,y₂′)  [1]

The predetermined positions A_(D1) and A_(D2) on the end surface T_(D)of the work image DW which are detected by the distance detecting means30D (and existing on the extensions of the Y axis direction of thepredetermined positions A_(R1) and A_(R2) which are set on the screenbefore by the human worker) are to be represented as below intwo-dimensional coordinates.Predetermined positions A_(D1)(X₁,y₁″),A_(D2)(x₂,y₂″)  [2]

Accordingly, the distances K_(D1) and K_(D2) with respect to the buttingfaces 15 and 16 can be represented as below based on the above [1] and[2].K _(D1) =|B _(R1) −A _(D1) |=y ₁ ′−y ₁″  [3]K _(D2) =|B _(R2) −A _(D2) |=y ₂ ′−y ₂″  [4]

These [3] and [4] are used by the distance difference calculating means30F for calculating distance differences Δy₁ and Δy₂, as describedabove.

The reference distance calculating means 30E calculates referencedistances K_(R1) and K_(R2) between the positions B_(R1) and B_(R2) ofthe edges of the butting faces and predetermined positions A_(R1) andA_(R2) on the work end surface T_(R) which are set in advance, by imageprocessing.

In this case, as described above (FIG. 18), the predetermined positionsA_(R1) and A_(R2) on the end surface T_(R) of the work image RW whichare set in advance on the screen are to be represented as below intwo-dimensional coordinates.Predetermined positions A_(R1)(x₁,y₁), A_(R2)(x₂,y₂)  [5]

Accordingly, reference distances K_(R1) and K_(R2) can be represented asbelow based on [5] and the aforementioned [1] (based on the positionsB_(R1) and B_(R2) of the edges of the butting faces 15 and 16).K _(R1) =|B _(R1) −A _(R1) |=y ₁ ′−y ₁  [6]K _(R2) =|B _(R2) −A _(R2) |=y ₂ ′−y ₂  [7]

These [6] and [7] are used by the distance difference calculating means30F for calculating distance differences Δy₁ and Δy₂.

The distance difference calculating means 30F compares the detecteddistances K_(D1) and K_(D2) represented by the above [3] and [4] withthe reference distances K_(R1) and K_(R2) represented by [6] and [7],and calculates the distance differences Δy₁ and Δy₂ between them.

That is, the distance difference Δy₁ is as follows.Δy ₁ =K _(D1) −K _(R1)=(y ₁ ′−y ₁″)−(y ₁ ′−y ₁)=y ₁ −y ₁″  [8]

The distance difference Δy₂ is as follows.Δy ₂ =K _(D2) −K _(R2)=(y ₂ ′−y ₂″)−(y ₂ ′−y ₂)=y ₂ −y ₂″  [9]

The robot control means 30G (FIG. 15) controls the robot 13 such thatthe detected distances K_(D1) and K_(D2) and the reference distancesK_(R1) and K_(R2) become equal based on the distance differences Δy₁ andΔy₂ represented by the above [8] and [9], thereby positioning the work Wat a predetermined position.

That is, when the robot control means 30G receives the distancedifferences Δy₁ and Δy₂ from the distance difference calculating means30F, the robot control means 30G converts these into correction drivesignals S_(a), S_(b), S_(c), S_(d), and S_(e) and sends each signal tothe robot 13.

The robot 13 actuates drive units a, b, c, d, and e constituting therobot 13 in accordance with the signals, thereby moving the work Wsupported by the gripper 14 in the Y axis direction by the distancedifferences Δy₁ and Δy₂ (FIG. 18).

Therefore, a control for making the detected distances K_(D1) and K_(D2)and the reference distances K_(R1) and K_(R2) become equal is performed,and the work W can be positioned at a predetermined position.

The bending control means 30H (FIG. 15) controls the press brake basedon the order of bending, etc. determined by the information calculatingmeans 10B and carries out the bending operation by the punch P and die Don the work W as positioned.

The input/output means 10J comprises a keyboard and a screen constitutedby liquid crystal or the like. For example, as described above, a humanworker sets the positions B_(R1) and B_(R2) of the edges of the buttingfaces 15 and 16 (FIG. 18), and also sets the predetermined positionsA_(R1) and A_(R2) on the end surface T_(R) of the work image RW which isobtained based on CAD information (step 202 in FIG. 23) by seeing thescreen.

Further, the distance detecting means 30D, the reference distancecalculating means 30E, and the distance difference calculating means 30Fperform the following operation in case of measuring the bending angle Θ(FIG. 19, FIG. 20).

That is, let it be assumed that the distance between one butting face 15and the work W at the time the positioning of the work W (FIG. 19(A)) iscompleted is K₁, and the distance at this time between the edge of thework W and the center E of a mold is L.

Further, let it be assumed that the distance between the butting face 15and the work W when the work W is bent to a predetermined bending angleΘ after the bending operation is started (FIG. 19(B)) and the punch Pcontacts the work W (after pinching point) is k₁, and a flange dimensionL′ at this time is represented by L′=L+α in consideration of unilateralelongation α which is calculated in advance by the informationcalculating means 30B. In this case, the following equation isestablished.k ₁ =L−L′×cos Θ+K ₁  [10]

The bending angle Θ can be represented by the following equation basedon [10].Θ=cos⁻¹ {(L+K ₁ −k ₁)/L′}  [11]

Accordingly, as apparent from [11], the distance k₁ between the buttingface 15 and the work W after the punch P contacts the work W and thebending angle Θ are related with each other in one-to-one correspondencebecause L, K₁ and L′ are constants. Therefore, the bending angle Θ isindirectly measured by detecting k₁.

From this aspect, the reference distance calculating means 30E (FIG. 15)receives the bending angle Θ calculated by the information calculatingmeans 30B based on the CAD information, and calculates the followingbending reference distance k_(r1) (FIG. 20 (A)).k _(r1) =L−L′×cos Θ+K _(R1)  [12]

This bending reference distance k_(r1) is a distance between apredetermined position a predetermined position a_(r1) on an end surfacet_(r) of a work image rw (FIG. 20(A)) based on CAD information and thepreviously set position B_(R1) of the edge of the butting face 15 incase of the work W being bent to the predetermined angle Θ.

Accordingly, after pinching point (step 210 in FIG. 23), in a case wherea bending detected distance k_(d1) (FIG. 20(A)) which is a distancebetween the butting face 15 and the work W detected by image processing(step 211 in FIG. 23) coincides with the bending reference distancek_(r1) (step 212 in FIG. 23: YES), the distance detecting means 30D(FIG. 15) determines that the work W has been bent to the predeterminedangle Θ, and stops the ram via the bending control means 30H (FIG. 15)(step 213 in FIG. 23), thereby completing the bending operation.

The bending detected distance k_(d1) is a distance between apredetermined position a_(d1) on an end surface t_(d) of a work image dw(FIG. 20(B)) which is input from the CCD camera 12A after pinching point(step 210 in FIG. 23: YES) and the previously set position B_(R1) of theedge of the butting face 15.

While the work W is being bent, the distance difference calculatingmeans 30F (FIG. 15) constantly monitors the bending detected distancek_(d1) detected by the distance detecting means 30D to compare it withthe bending reference distance k_(r1) calculated by the referencedistance calculating means 30E and calculate a distance difference Δy(FIG. 20(A)). In a case where it is determined that Δy=0 is satisfiedand the both coincide with each other (step 212 in FIG. 23: YES), theram is stopped via the bending control means 30H (FIG. 15) (step 213 inFIG. 23), as described above.

However, in a case where Δy≠0 (step 212 in FIG. 23: NO) and the work Wcan not be bent to the bending angle Θ, for example, in case of abending angle Θ′ (FIG. 20(B)), i.e. in case of a bending angle beingsmaller than required, the ram is lowered further via the bendingcontrol means 30H (FIG. 15), thereby adjusting the position of the ram(step 214 in FIG. 23).

The operation according to the second embodiment of the presentinvention having the above-described structure will now be explainedbased on FIG. 23.

(1) Controlling Operation for Positioning of the Work W

CAD information is input in step 201 of FIG. 23, detection points areset in step 202, reference distances are calculated in step 203, and thebutting faces are moved to the set positions in step 204.

That is, when CAD information is input from the superordinate NC device29 (FIG. 15) to the subordinate NC device 30, a work image RW (FIG. 18)as a development is displayed on the screen of the input/output means30J (FIG. 15). By seeing this screen, a human worker sets the positionsB_(R1) and B_(R2) of the edges of the butting faces 15 and 16 as thedetection points, and also sets the predetermined positions A_(R1) andA_(R2) on the end surface T_(R) of the work image RW which is based onthe CAD information. At this time, as described above, by butting theleft end (FIG. 24(A)) of the work W on the side gauge 18, the work W ispositioned in the X axis direction such that the left end (FIG. 24(B))is arranged to be apart from the machine center MC by X₁.

When the detection points are set, each detection point is sent to thereference distance calculating means 30E via the information calculatingmeans 30B (FIG. 15).

Then, reference distances K_(R1) and K_(R2) between the positions B_(R1)and B_(R2) of the edges of the butting faces 15 and 16 and predeterminedpositions A_(R1) and A_(R2) on the work end surface T_(R) which are setearlier are calculated by the reference distance calculating means 30E(FIG. 15) in accordance with [6] and [7] described above.

Further, in this case, the reference distance calculating means 30Ecalculates not only the reference distances K_(R1) and K_(R2) forpositioning, but also the bending reference distance k_(r1) for thebending operation in accordance with [12] described above,

When the reference distances K_(R1), K_(R2), and k_(d1) are calculatedin this manner, the CPU 30A (FIG. 15) instructs the bending controlmeans 30H to move the butting faces 15 and 16 to the positions B_(R1)and B_(R2) (FIG. 18) of the edges of the butting faces 15 and 16 whichare set earlier.

In this state, positioning of the work W by the robot 13 is carried outin step 205 of FIG. 23, distances from the butting faces are detected instep 206, and whether they are predetermined distances or not isdetermined in step 207. In a case where they are not the predetermineddistances (NO), the flow returns to step 205 to repeat the sameoperation, In a case where they are the predetermined distances (YES),positioning of the work W is completed in step 208.

That is, when the CPU 30A (FIG. 15) detects that the butting faces 15and 16 are moved to the set edge positions B_(R1) and B_(R2) (FIG. 18),the CPU 30A drives the robot 13, this time via the robot control means30G (FIG. 15). At the same time, the CPU 30A moves the butting faces 15and 16 via the bending control means 30H, so that the CCD camera 12A andits light source 12B which are attached to the butting face are moved tophotograph the work W supported by the gripper 14 of the robot 13.

The photographed image of the work W is sent to the distance detectingmeans 30D. Based on the sent work image DW (FIG. 18), the distancedetecting means 30D detects distances K_(D1) and K_(D2) between thepositions B_(R1) and B_(R2) of the edges of the butting faces 15 and 16and predetermined positions A_(D1) and A_(D2) on a work end surfaceT_(D) in accordance with [3] ad [4] described above.

The detected distances K_(D1) and K_(D2) and the reference distancesK_(R1) and K_(R2) calculated by the reference distance calculating means30E are sent to the distance difference calculating means 30F for thenext step, and distance differences Δy₁ and Δy₂ between them arecalculated in accordance with [8] and [9] described above.

Due to this, the robot control means 30G converts the distancedifferences Δy₁ and Δy₂ into correction drive signals S_(a), S_(b),S_(c), S_(d), and S_(e), and sends these signals to the robot 13 tocontrol the drive units a, b, c, d, and e of the robot 13 such that thedetected distances K_(D1) and K_(D2) (FIG. 18) and the referencedistances K_(R1) and K_(R2) coincide with each other, therebypositioning the work W at a predetermined position.

If positioning of the work W by the robot 13 is carried out in thismanner and the detected distances K_(D1) and K_(D2) and the referencedistances K_(R1) and K_(R2) coincide, positioning of the work W iscompleted.

(2) Controlling Operation for Bending Operation

When the positioning of the work W is completed, the ram is lowered instep 209 of FIG. 23, and whether the punch P contacts the work W or notis determined in step 210. In a case where the punch P does not contact(NO), the flow returns to step 209 to repeat the same operation. In acase where the punch P contacts (YES), distances from the butting facesare detected in step 211. Then, whether they are predetermined distancesor not is determined in step 212. In a case where they are not thepredetermined distances (NO), the position of the ram is adjusted instep 214. In a case where they are the predetermined distances (YES),the ram is stopped and the bending operation is completed in step 213.

That is, when the CPU 30A (FIG. 15) detects via the robot control means30G that the positioning of the work W is completed, the CPU 30A lowersthe ram, or the upper table 20 in case of, for example, a lowering typepress brake, via the bending control means 30H this time.

Then, the CPU 30A detects the position of the ram 20 via ram positiondetecting means or the like. In a case where it is determined that thepunch P contacts the work W, the CPU 30A then moves the butting face 15via the bending control means 30H so that the CCD camera 12A and itslight source 12B are moved to photograph the work W, and controls thedistance detecting means 30D to detect a bending distance k_(d1) withrespect to the butting face 15 based on the photographed image dw (FIG.20(A)) of the work W.

This bending detected distance k_(d1) is sent to the distance differencecalculating means 30F. The distance difference calculating means 30Fcalculates a distance difference Δy with respect to the bendingreference distance k_(r1) calculated by the reference distancecalculating means 30E. In a case where Δy=0 is satisfied and the bendingdetected distance k_(d1) and the bending reference distance k_(r1)coincide with each other, it is determined that the work W has been bentto the predetermined bending angle Θ (FIG. 20(B)). Therefore, loweringof the ram 20 is stopped via the bending control means 30H, and thebending operation is completed.

INDUSTRIAL APPLICABILITY

As described above, the bending machine according to the presentinvention can position a work accurately by carrying out electronicpositioning by using image processing, even in a case where mechanicalpositioning by using butting faces is impossible.

Further, if a corner of a work is used as a target of comparison in acase where a detected image and a reference image are compared by imageprocessing, the amount of difference between both of the images can becorrected at one time by photographing either one of the corners byusing one CCD camera Therefore, it is possible to improve the efficiencyof operation including positioning of the work. By carrying out the workpositioning control operation and the bending control operation by onedevice, the system can be simplified. Attaching of the workphotographing means to the butting face eliminates the need of providinga special moving mechanism, thereby enabling cost cut.

1. A work positioning device, comprising: an image processor thatprocesses images from which measured values are obtained, so that a workis positioned at a predetermined position such that a measured valuecoincides with a reference value relating to the predetermined position;and a mobile camera that is guidable in a predetermined direction andthat captures the images from which the measured values are obtained. 2.The work positioning device according to claim 1, wherein said mobilecamera is guidable in a plurality of predetermined directions.
 3. Thework positioning device according to claim 1, further comprising: alight source that is guidable in the predetermined direction, whereinmovement of said mobile camera and said light source is synchronized. 4.The work positioning device according to claim 1, wherein the imageprocessor is configured to obtain the reference value from a processedimage by utilizing the hole formed in the reference work and a workpositioning mark provided on the work.
 5. The work positioning deviceaccording to claim 1, wherein the image processor processes images fromwhich measured values are obtained by using a work positioning markcorresponding to the work, and a reference positioning markcorresponding to a reference work corresponding to reference image. 6.The work positioning device according to claim 5, wherein the workpositioning mark comprises a hole formed in the work at a predeterminedposition.
 7. The work positioning device according to claim 1, whereinthe reference value is generated using side stoppers, the side stoppersbeing provided on the work positioning device and configured to abut areference work so as to mark an outline of the reference workcorresponding to a reference image, and wherein image data of theoutline of the work is generated using at least one check area which ispredetermined based on the reference image.
 8. A work positioningdevice, comprising: an image processor that processes images from whichmeasured values are obtained, so that a work is positioned at apredetermined position such that a measured value coincides with areference value corresponding to the predetermined position, whereinimage data of an outline of the work is generated using at least onechecker which provides a check area configured to detect image data, thecheck area being based on a reference image from which the referencevalue is obtained.
 9. The work positioning device according to claim 8,wherein the image processor processes images from which measured valuesare obtained, the working positioning device further comprising acalculator which compares a work outline corresponding to the work to areference outline corresponding to the reference image so that acompared result is obtained, the compared result being used to calculatean amount of difference between the corresponding work outline and thecorresponding reference outline.
 10. The work positioning deviceaccording to claim 8, wherein the reference value is generated usingside stoppers, the side stoppers being provided on the work positioningdevice and configured to abut a reference work so as to mark an outlineof the reference work corresponding to the reference image.